package org.dolphin.service.impl;

import org.dolphin.base.constant.Measurement;
import org.dolphin.dao.UomDao;
import org.dolphin.entity.measurement.UnitOfMeasurement;
import org.dolphin.service.UomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service(value = "uomService")
@Transactional(readOnly = true, propagation = Propagation.REQUIRED)
public class UomServiceImpl implements UomService {
  @Autowired(required = true)
  private UomDao uomDao;

  @Override
  public UnitOfMeasurement getUnitOfMeasurement(Measurement measurement) {
    UnitOfMeasurement unitOfMeasurement = uomDao.getUnitOfMeasurement(measurement);
    return unitOfMeasurement;
  }

}
